<template>
  <div class="header">
    <div class="header-left">
      <span class="iconfont back-icon">&#xe65b;</span>
    </div>
    <div class="header-input">
      <span class="iconfont">&#xe616;</span>
      输入城市/景点/游玩主题
    </div>
    <router-link :to="{name: 'city'}">
      <div class="header-right">
        {{this.city}}
        <span class="iconfont">&#xe600;</span>
      </div>
    </router-link>
  </div>
</template>

<script>
import { mapState } from 'vuex'
export default {
  name: 'Header',
  computed: {
    ...mapState(['city'])
  }
}
</script>

<style lang="scss" scoped>
/* @import "~scss/varibles.scss"; */
@import "scss/varibles.scss";

.header {
  display: flex;
  height: $headerHeight;
  line-height: $headerHeight;
  background: $themeBgColor;
  color: #fff;
  .header-left {
    width: 0.64rem;
    .back-icon {
      padding-left: 0.14rem;
      font-size: 0.4rem;
      text-align: center;
    }
  }
  .header-input {
    flex: 1;
    height: 0.64rem;
    line-height: 0.64rem;
    margin: 0.12rem 0 0 0.2rem;
    padding: 0 0.2rem;
    background: #fff;
    border-radius: 0.1rem;
    color: #ccc;
  }
  .header-right {
    min-width: 1.04rem;
    padding: 0 .1rem;
    text-align: center;
    color: #fff;
  }
}
</style>
